<!DOCTYPE html>
<html>
<head>
<title>用户添加</title>
<meta name="content-type" content="text/html; charset=UTF-8">
<div th:replace="/pub.html"></div>
<script type="text/javascript">
var useradd_submitForm = function(dialog, user_datagrid, p) {
	if ($('#user_addForm').form('validate')) {
		$.post('/perm/user/add', $("#user_addForm").serialize(), function(j) {
			if (j.success) {
				user_datagrid.datagrid('reload');
				dialog.dialog('destroy');
			}
			p.messager.show({
				title : '提示',
				msg : j.msg,
				timeout : 5000,
				showType : 'slide'
			});
		}, 'json').error(function() {
			$.messager.show({
				title : '提示',
				msg : '你的权限不够',
				timeout : 5000,
				showType : 'slide'
			});
		});
	}
};
</script>
</head>

<body>
	<form id="user_addForm" method="post">
		<input type="hidden" name="shopId" id="shopId" />
		<table style="width: 100%;" class="table table-hover table-condensed">
			<tr>
				<th>用户名</th>
				<td><input name="username" class="easyui-validatebox" data-options="required:true,missingMessage:'用户名必填'" /></td>
				<th>密码</th>
				<td><input type="password" name="pwd" class="easyui-validatebox" data-options="required:true,missingMessage:'密码必填'" /></td>
			</tr>
		</table>
	</form>
</body>
</html>